package com.study.basetype.service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author flwu
 * @date 2020/3/22 3:50 PM
 * @MOTTO 保持空杯和敬畏
 */
public class LoveFactory {
    private static final Map<Integer, ILoveService> serviceMap = new HashMap<>();

    public static void addService(int type, ILoveService service) {
        serviceMap.put(type, service);
    }

    public static ILoveService getLoveService(int type) {
        return serviceMap.get(type);
    }
}
